<?php
  
  # Notion d'image
  class Image {
    private $url=""; 
    private $id=0;
    private $comment;
    private $category;
    private $path;
    private $like;
    private $unlike;
    
    function __construct($u,$id, $com, $cat, $path, $like, $unlike) {
      $this->url = $u;
      $this->id = $id;
      $this->comment = $com;
      $this->category = $cat;
      $this->path = $path;
      $this->like = $like;
      $this->unlike = $unlike;
    }
    
    # Retourne l'URL de cette image
    function getURL() {
		return $this->url;
    }
    function getId() {
      return $this->id;
    }
    function getComment() {
	    return $this->comment;
    }
    function getCategory() {
	    return $this->category;
    }
    function getPath() {
    	return $this->path;
    }
    function getLike() {
    	return $this->like;
    }
    function getUnlike() {
    	return $this->unlike;
    }
    
    function setCategory($cat) {
    	$this->category = $cat;
    }
    function setComment($comment) {
    	$this->comment = $comment;
    }
    function setPath($path) {
    	$this->path = $path;
    }
    
    function like() {
    	$this->like++;
    }
    function unlike() {
    	$this->unlike++;
    }
  }
  
  
?>